package stringbuilder;
/*
只要输出对象就是在答应对象的地址值,如果不是地址值那么说明"有人捣鬼"

 */

public class StringBuilderDemo {
    public static void main(String[] args) {
        //无参构造
        StringBuilder sb1 = new StringBuilder();
        System.out.println("sb1 = " + sb1);


        //带参构造 String - > StringBuilder()
        StringBuilder sb2 = new StringBuilder("hello");
        System.out.println("sb2 = " + sb2);//hello

        //StringBuilder sb3 = "hello";
        //String str = sb1;
        //String str = sb1.toString();
        String str = sb1 + "";

    }
}
